This provides better input facilities over the INPUT command or OS_ReadLine
SWI.
It can convert lower-case letters to upper-case, only allow numbers,
display stars for any characters pressed, automatic return, ignore
cursor/function etc. keys.
UPDATED : 22/7/95 - Add new option, improve speed from MOV R0,<n>/SWI OS_WriteC to SWI OS_WriteI+<n>, improve escape detection & removing
UPDATED : 6/8/95 - Add routine to allow the HOME key to reset cursor
position and clear the input line, and to ignore various other keys. Also
allow both DELETE keys to act in the same way. Change ANDS Rx,Rx,#T_xxx to
TST Rx,#T_xxxx
UPDATED : 7/9/95 - Allow input area to be filled with any valid ASCII value, if new bit (9) is set
UPDATED : 9/9/95 - Improve conversion to upper-case. Now does it in three commands
UPDATED : 5/11/95 - Improve checking routines. Now a few lines less
Registers used :
R0 - X
R1 - Y
R2 - Length of input
R3 - Input state : Bit 0 - Conversion to uppercase
Bit 1 - Allow only alphabetic characters
Bit 2 - Allow only numbers
Bit 3 - Display star
Bit 4 - Return as soon as length reached
Bit 5 - Use NULL as terminator instead of CR
Bit 6 - Allow spaces
Bit 7 - Y,y, N or n only
Bit 8 - Allow only non-alphanumeric characters
Bit 9 - Use guidance markers
R4 - Start address of input
R5 - ASCII value for filling input area (Guidance markers)
Returns :
R0 - Length of input
¤ Has a test program ¤
Screen_CharCopy
This copies a character over a given number of times either to the screen or to memory (in which case it can be used as a memory fill). It is equivalent
to BASIC's STRING$ command (if address = 0).
UPDATED : 7/9/95 - Allow multiple characters to be stored in memory. Add memory check.
Registers used :
R0 - Character (must be > 31, if address is 0)
R1 - Number of iterations
R2 - Start address of storage (used only if > 0)
NOTE : You will only get screen output if address is 0
¤ Has a test program ¤
Screen _GotoXY
This moves the cursor to a given X and Y coordinate. It is especially
useful in machine code as it saves the programmer having to fiddle around
with the code to send VDU bytes
UPDATED : 22/7/95 - Removes branch. Instead does an SWI OS_WriteI first, followed by 2 OS_WriteC's
Registers used :
R0 - X
R1 - Y
¤ Has a test program ¤
Screen_Box
Screen_Box is only really useful if you re-define the 8 * 8 character
font. It is designed to draw a box anywhere on the screen using UDG
characters. This allows boxes to be displayed in text-only modes, or where
pixel co-ordinates are too accurate.
UPDATE : 6/8/95 - Fix bug
Registers used :
R0 - X
R1 - Y
R2 - X length
R3 - Y length
R4 - ASCII start value
Screen_TextMenu
This SWI is designed to allow text menu creation where all the options
start on the same column.
UPDATED : 6/8/95 - Improve cursor movement slightly by removing LDRB.
Instead place cursor position in extra register. Also change memory error